Are there any technical obstacles for implementing `function* ()` syntax

Posted by shabunc on Programmers See other posts from Programmers or by shabunc
Published on 2013-11-08T12:28:38Z Indexed on 2013/11/08 16:14 UTC
Read the original article Hit count: 246

Filed under:
|
|

In Python we have yield which is very similar to that one which is proposed in ES6 (in fact, pythonic co-routines were the main source of inspiration for implementing co-routines in

I wonder what are the reasons for choosing a separate function* () syntax for generators compared to just defining "regular" functions with yeilds - just like in python by the way? I'm talking strictly of technical issues and peculiarities. Why it had been decided that a separate form will be more appropriate?

© Programmers or respective owner

Related posts about JavaScript

Related posts about es6